import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_tool/flutter_tool.dart';

void main() {
  test('adds one to input values', () {
    var value1 = [[1,3], 2, 3, {1:2, 2:[1,2], 3: TestClass('name', 'value')}];
    var value2 = [[1,3], 2, 3, {1:2, 2:[1,2], 3: TestClass('name', 'value')}];
    var value3 = {1:2, 3:4, 5:[6]};
    var value4 = {1:2, 3:4, 5:[6]};
    debugLog('${value1.equalTo(value2)} ===== ${value3.equalTo(value4)}');
    var reg = RegExp("/video/[0-9a-z]{${"7364065205053181199".length}}");
    var result = 'https://douyin.com/video/7364065205153181199';
    var matchResult = result.hasMatch(reg).$2;
    double maxValue = 1.0.max(2.0);
    int minValue = 1.min(2);

    debugLog('matchResult: $matchResult ====$maxValue === $minValue ====${1.0.lessThan(2)} ===');
    // debugLog('${matchResult.runtimeType} == ${matchResult.$1} ===== ${matchResult.$2[0]}====${matchResult.$3}');
    // expect(actual, matcher)
    // var time = DateTime.now();
    // var time1 = DateTime(1997, 4, 24);
    // debugLog(time.parseToString() +'====='+ time1.isSameDayInPerYear(time).toString());
    // debugLog(time.parseToString().tryParseToDateTime().equalTo(DateTime(1970)));
    // final calculator = Calculator();
    // expect(calculator.addOne(2), 3);
    // expect(calculator.addOne(-7), -6);
    // expect(calculator.addOne(0), 1);
  });
}


class TestClass {
  TestClass(this.name, this.value);
  final String name;
  final String value;
  final Map cValue ={
    1:1,
    2:2,
    3:[3,4]
  };

  @override
  bool operator ==(Object other) {
    // TODO: implement ==
    if (other is TestClass) {
      return other.name == name && other.value == value && other.cValue.equalTo(cValue);
    }
    return false;
  }

  // @override
  // // TODO: implement hashCode
  // int get hashCode => Object.hash(name, value);
}